package com.iceberg.adgt.domain;

import com.iceberg.adgt.common.DomainException;

final class Structure {

	private String name;
	private String author;
	private final Architecture architecture;

	Structure(Architecture architecture) {
		this.architecture = architecture;
	}

	Architecture getArchitecture() {
		return architecture;
	}

	String getName() {
		return name;
	}

	void setName(String name) throws DomainException {
		if (name.equals("")) {
			throw new DomainException("Name cannot be empty");
		} else {
			this.name = name;
		}
	}

	String getAuthor() {
		return author;
	}

	void setAuthor(String author) throws DomainException {
		if (author.equals("")) {
			throw new DomainException("Author name cannot be empty");
		} else {
			this.author = author;
		}
	}
}
